home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr51
/
lib201.zip
/
JPMOUSE.TXT
< prev
next >
Wrap
Text File
|
1992-07-08
|
7KB
|
141 lines
JPMOUSE - Version 2.01
by Jay Parsons (Jparsons)
Interim release modifications
by Ken Chan (HazMatZak)
July 8, 1992
This file contains JPMOUSE.BIN, a mouse manager, and its source
code JPMOUSE.ASM.
The following fixes were made to version 2.0 (06/21/92 release) of
JPMOUSE:
(1) "+" call shows cursor after enabling driver
(2) "-" call hides cursor after disabling driver
(3) "R" call shows cursor after reseting driver
This version is compatible with version 1 of JPMOUSE. However, it
adds support for calls with "R", to reset the mouse and turn it on in one
step, and to report or set the mouse cursor position.
If you've downloaded MUSCLICK.ZIP, you know it also reports the
mouse position. The differences are that this program can also set the
mouse position and that this one reports the current position. The call
for position to MUSCLICK gives the position at the last click, which may
not be the current position. Also, of course, MUSCLICK is event-driven and
reports each click after it is installed. This program must be called each
time it is to do anything.
The complete list of arguments to, and returns values from this
program is as follows:
; argument: 'R' to check for and reset mouse and turn it on.
; '?' to check for and reset mouse, but NOT turn it on.
; '+' to enable driver and show mouse cursor
; '-' to disable driver and hide mouse cursor
; 'H' to hide cursor only
; 'S' to show cursor only
; any argument below chr(43), or chr(255):
; first argument is interpreted as row, second as column,
; both as chr() values. If argument is chr(255),
; mouse is not moved, otherwise is is moved to that
; row, column or both. In any case the mouse cursor
; row and column are returned. If only one argument
; is furnished, mouse will be moved to column zero.
; returns: If called with '?' or 'R' returns 'T' if mouse, or 'F'.
; Calls with first argument below chr(43), or chr(255),
; return row and column of mouse cursor as chr() values.
; Calls with first argument $ "+-HS" return 'T',
; call with some other character returns 'F'.
When I uploaded the first version of this I thought I knew how to
prevent mouse droppings in all cases. I no longer think I know. This
program supports all the standard calls to int 33h functions for these
purposes; you'll just have to experiment to see what works for you.
Typically, repeated calls with "+" or "R" will leave mouse droppings. In a
program, if the mouse status is unknown it seems safest to call with "?",
then with "+" if it is desired to turn the mouse cursor on.
When called with "-", this program calls function 1Fh of int 33h to
disable the driver, as well as hiding the cursor. However, my LogiTech
driver continues to track movement of the mouse, which is not supposed to
occur. Theoretically, calls with "H" and "S" should be made if it is
desired to hide then show the cursor but keep the driver active, while "-"
and "+" should disable/reenable the driver. I cannot promise that calls
with "-" will prevent recognition of undesired mouse actions.
Here's the list of int 33h functions called in each case, except
the ones to move or report the mouse cursor:
argument: calls these int 33h functions:
R 0 and 1
? 0 only
+ 20h and 1
- 1Fh and 2
H 2 only
S 1 only
By sheer good luck, the highest possible row is 42, one less than
the ASCII value of "+", which allowed expanding this to recognize calls
with a row for an argument without making it incompatible with the original
version. The calling syntax is
CALL JPMOUSE WITH cMRow, cMCol
where cMRow and cMCol contain either the chr() value of the row and
column to which the mouse is to be moved, or chr(255) if you don't want to
move it. The row and column of the (new) position will be returned and can
be found as asc(cMRow) and asc(cMCol) respectively. It is possible to call
with cMRow = chr(255) and cMCol = chr(0), or the like, in this case to move
the mouse cursor to the left edge of the screen without changing the row.
If you omit the second argument, the mouse will be moved to column 0. As
usual, the arguments must be variables for any information to be returned.
If you are using this to manage the mouse at the same time you are
using MUSCLICK to report clicks, do not call with "?" or "R" after the call
to MUSCLICK to install it. Calling this program with "?" or "R" resets the
mouse and disables user handlers, including the one installed by MUSCLICK.
Since repeated installations of MUSCLICK without uninstalling it could
result in scrambling the address of the active mouse-event handler, care
should be taken to uninstall the MUSCLICK handler before calling this
program to reset the mouse.
** DISCLAIMER **
This freeware is published as an educational item for those
interested, and is not warranted in any way. It will, it is hoped, become
obsolete when the next release of dBASE after dBASE IV 1.5 provides more
complete mouse support.
Please report bugs or problems to:
Jay Parsons
52 Chapin Road
Bernardsville, NJ 07924
Voice: (908) 766-3380
Fax: (908) 766-3381
CIS: 70160,340
BORBBS: Jparsons
or
Ken Chan
BORBBS: HazMatZak
BORBBS = the Borland Technical Support BBS, accessible toll-free
through the Compuserve Information Network for all Borland customers; you
do not have to be a Compuserve subscriber. As of this writing, BORBBS only
supports former Ashton-Tate products, like dBASE (in a previous life, it
was ATBBS).
To get access, call your local Compuserve node. Upon connection,
press <Enter> (do not press Ctrl-C). At the "Host Name:" prompt, type
"BORBBS" and press <Enter>. You will need a valid serial number of a
Borland product to register.